home *** CD-ROM | disk | FTP | other *** search
-
-
- int do_command (char * str)
- {
- char * arg;
- char * aux1,
- * aux2,
- * repstr[MAXIA];
- char quoted;
- WORD repi = 0;
- long j;
- WORD low;
- WORD high;
- WORD diff;
- static int level = 0;
- COMM * comm;
- #ifdef DEBUG_FILE
- static FILE * debug_file = NULL;
-
- if (!debug_file && GETF_DEBUG(Ep))
- debug_file = fopen ("t:XDME.debug", "w");
- #endif
-
- if (!str || !*str)
- return (1);
-
- #ifdef DEBUG_FILE
- if (debug_file && GETF_DEBUG(Ep))
- fprintf (debug_file, "%s\n", str);
- #endif
-
- if (MacroRecord != 0 && level == 0) { /* PATCH_NULL [14 Feb 1993] : added */
- add_record (str); /* PATCH_NULL [14 Feb 1993] : added */
- } /* if */ /* PATCH_NULL [14 Feb 1993] : added */
-
- if (++level > 20)
- {
- DEFMESSAGE( _COM_recursion_too_deep, "command:\nRecursion too deep" )
- error ("command:\nRecursion too deep");
- --level;
-
- foundcmd = 1; /* to prevent us from trying an ARexx macro */
-
- return (0);
- }
-
- while ((arg = breakout (&str, "ed, &aux1)) &&
- !(GETF_LOOPBREAK(Ep) || GETF_LOOPCONT(Ep)) )
- {
-
- $(@FOREACH@comtree@
- $(value)
- )
-
- fail:
- --level;
-
- while (--repi >= 0)
- free (repstr[repi]);
-
- if (aux1) free (aux1);
-
- return 0;
-
- loop:
- if (aux1) free (aux1);
- } /* while (arg) */
-
- --level;
-
- while (--repi >= 0)
- free (repstr[repi]);
-
- return 1;
- } /* do_command */
-
-
-